Skip to main content

Creating Elements in Bulk Using PI Builder

It can be advantageous to configure similar elements in a bulk fashion before connecting them together. It is often easier to obtain configuration data of tanks, meters, and process information and import them into a spreadsheet format, instead of configuring them individually through dialog boxes. For example, if you have 1000 flow meters to create, and they all have similar attributes, creating the elements all at once is a faster method. Similarly, updating Attributes for many similar objects at once is better in a bulk editing tool.

The PI Builder by OSIsoft is an add-in to Microsoft Excel created for this purpose. You use it to choose similar elements (based on the same Element template) and modify Attributes of the selected elements, create, or remove elements in the database. Below is a quick example given on how to import and export elements using AF Builder. For more information about the PI AF Builder see the "PI AF Builder User Guide."

To create a series of elements:

  1. In System Explorer, create an example Element that is to be created in bulk.

    In our example, we used the 'SF_FlowTemplate' to create a flow 'SF_Flow1' element.

  2. In Excel, open a new worksheet and click on the PI Builder tab.

    If the PI Builder tab is not available on the menu bar, you will need to install it using the instructions 'PI AF Builder' in the "PI AF Building User Manual."

  3. Import the Element you created:

  4. On the PI Builder menu, select ElementsFind Elements to open the Element Search window.Figure 116: PI Builder - Element Search window

  5. Use the search options to search for the Element that is to be imported.

  6. Click on the Element to select it.

  7. Click OK to close the Element Search window.

    The Select Object Type and Column Headers window.Figure 117: PI Builder - Select Object Types and Column Headers window

  8. Ensure that the Object Type is displaying 'Element'.

  9. Ensure that the Columns list shows that all Required Columns are selected (checked) and under Element, that Template is selected (checked).

  10. (Optional) If you want to change particular Attributes of these Elements:

  11. Click the More Attribute Columns... button to open the Select Attributes window.Figure 118: Select Attributes window

  12. Select the Attributes you want to import and click the Add button to add them to the list on the right.

  13. After all Attributes have been selected, click OK to save them and close the Select Attributes window.

    You are returned to the Select Object Types and Column Headers window in which the Attributes you selected have been added.Figure 119: PI Builder - Select Object Types and Column Headers window with added Attributes

  14. Under Attribute Columns, ensure that the Attributes you had selected are all checked.

  15. Click OK to save the selections and close the Select Object Types and Column Headers window.

    The Retrieve Selected Objects window opens showing the confirmation log.Figure 120: Retrieve Selected Objects window

  16. Click Close to close the Retrieve Selected Objects window.

    The spreadsheet is filled in with the element's details, selected Attributes and the respective headers as shown in Figure 121.Figure 121: Excel spreadsheet displaying Element details, Attributes and headers

  17. Either copy and paste the row of the example element, or drag it down, so that the other rows get filled with the example Element data.

  18. Assign the Element names as needed.

  19. (Optional) Edit the Attributes and configured Data References for the elements.Figure 122: Excel spreadsheet filled in and edited as necessary

    Note: All elements with an 'x' in the Selected(x) column will be exported.

  20. When you are satisfied with the changes in the spreadsheet, click Publish on the PI Builder menu.

    The Publish Options window opens.Figure 123: Publish Options window

  21. Click the Edit Mode down-arrow and select mode to use.

    We recommend selecting Create and Edit most of the time for this type of scenario, as it created the elements that do not exist and edits the ones that exist but have some new changes. Only in very specific situations, might you need to use one of the other modes.

  22. Click OK to save your selection and close the window.

    The Publish Selected Objects window opens, showing the list of elements published.Figure 124: Publish Selected Objects window

    In publishing, the selected elements are created and automatically checked-in.

  23. Click Close to close the Publish Selected Objects window.

  24. (Optional) To verify that all the elements have been checked-in:

  25. Open System Explorer.

  26. In the navigation pane, select Elements.Figure 125: Elements tree view showing newly checked in elements

    The new elements are listed in the Elements tree view.

Note: After you become familiar with the format of the configuration string of Data References, you can save time in configuration by not using the configuration dialog boxes. To do this, copy and paste a result to another column or row and change the data reference string to the appropriate value. The Excel string concatenation function (using "=CONCATENATE()" ) can also be used to aid in the construction of the configuration string.